package com.atguigu.realtime.tests

import java.util

import com.atguigu.realtime.utils.RedisUtil
import redis.clients.jedis.Jedis

/**
 * Created by Smexy on 2021/7/10
 */
object RedisTest {

  def main(args: Array[String]): Unit = {

    val jedis: Jedis = RedisUtil.getJedisClient()

    // 如果key不存在，返回一个空的set集合
    val set: util.Set[String] = jedis.smembers("aaaa")

    println(set.size())


    // string类型，key不存在，返回null
    val result: String = jedis.get("bbbbb")

    println(result)


  }

}
